#app {
  .main-container {
    height: 100%;
    transition: margin-left 0.28s;
    margin-left: $sideBarWidth;
    position: relative;
    overflow-y: auto;
  }

  .sidebar-container {
    transition: width 0.28s;
    width: $sideBarWidth !important;
    background-color: $menuBg;
    height: 100vh;
    position: fixed;
    font-size: 0px;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1001;
    overflow: hidden;

    // reset element-ui css
    .horizontal-collapse-transition {
      transition: 0s width ease-in-out, 0s padding-left ease-in-out,
        0s padding-right ease-in-out;
    }

    .scrollbar-wrapper {
      overflow-x: hidden !important;
    }

    .el-scrollbar__bar.is-vertical {
      right: 0px;
    }

    .el-scrollbar {
      height: 100%;
      box-sizing: border-box;
      padding: 0 20px;
    }
    .el-submenu.is-opened {
      border-radius: 5px;
      .el-submenu__title {
        font-size: 14px;
        font-weight: bold;
        border-radius: 5px;
        .sub-el-icon {
          color: rgba(0, 119, 255, 1);
        }
      }
      .el-menu-item.is-active {
        // background-color: rgba(255, 255, 255, 0.3) !important;
      }
    }

    &.has-logo {
      .el-scrollbar {
        height: calc(100% - 80px);
      }
    }

    .is-horizontal {
      display: none;
    }

    a {
      width: 100%;
      overflow: hidden;
      box-sizing: border-box;
      padding: 0 15px !important;
      // display: block;
    }
    .only-one-child{
      padding: 0 !important;
    }

    .svg-icon {
      margin-right: 16px;
      // width: 22px;
      // height: auto;
    }

    .sub-el-icon {
      margin-right: 12px;
      margin-left: -2px;
    }

    .el-menu {
      border: none;
      height: 100%;
      width: 100% !important;
    }

    // menu hover
    .submenu-title-noDropdown{
      border-radius: 5px;
      &:hover {
        background-color: rgba(63, 140, 255, 0.1) !important;
      }
    }
    
    .el-submenu__title {
      border-radius: 5px;
      overflow: hidden;
      &:hover {
        background-color: rgba(63, 140, 255, 0.1) !important;
      }
    }

    .is-active > .el-submenu__title {
      color: $subMenuActiveText !important;
    }

    & .nest-menu .el-submenu > .el-submenu__title,
    & .el-submenu .el-menu-item {
      min-width: auto !important;
      height: 40px !important;
      line-height: 40px !important;
      box-sizing: border-box;
      padding: 0 15px;
      &:hover {
        background-color: rgba(63, 140, 255, 0.1) !important;
      }
    }
    
  }

  .hideSidebar {
    .el-menu-item.is-active{
      background-color: transparent !important;
    }
    .sidebar-container {
      width: 100px !important;
      .el-scrollbar {
        padding: 0 !important;
      }
    }

    .main-container {
      margin-left: 100px;
    }

    .submenu-title-noDropdown {
      padding: 0 !important;
      position: relative;

      .el-tooltip {
        padding: 0 !important;

        .svg-icon {
          margin-left: 0px;
        }

        .sub-el-icon {
          margin-left: 6px !important;
          margin-right: 6px !important;
        }
      }
    }

    .el-submenu {
      overflow: hidden;

      & > .el-submenu__title {
        padding: 0 !important;

        .svg-icon {
          margin-left: 0;
        }

        .sub-el-icon {
            margin-left: 12px !important;
            margin-right: 6px !important;
        }

        .el-submenu__icon-arrow {
          display: none;
        }
      }
    }

    .el-menu--collapse {
      .el-submenu {
        & > .el-submenu__title {
          & > span {
            height: 0;
            width: 0;
            overflow: hidden;
            visibility: hidden;
            display: inline-block;
          }
        }
      }
    }
  }

  .el-menu--collapse .el-menu .el-submenu {
    min-width: $sideBarWidth !important;
  }

  // mobile responsive
  .mobile {
    .main-container {
      margin-left: 0px;
    }

    .sidebar-container {
      transition: transform 0.28s;
      width: $sideBarWidth !important;
    }

    &.hideSidebar {
      .sidebar-container {
        pointer-events: none;
        transition-duration: 0.3s;
        transform: translate3d(-$sideBarWidth, 0, 0);
      }
    }
  }

  .withoutAnimation {
    .main-container,
    .sidebar-container {
      transition: none;
    }
  }
}

// when menu collapsed
.el-menu--vertical {
  & > .el-menu {
    .svg-icon {
      margin-right: 16px;
    }
    .sub-el-icon {
      margin-right: 12px;
      margin-left: -2px;
    }
  }


  // the scroll bar appears when the subMenu is too long
  > .el-menu--popup {
    max-height: 100vh;
    overflow-y: auto;

    &::-webkit-scrollbar-track-piece {
      background: #d3dce6;
    }

    &::-webkit-scrollbar {
      width: 6px;
    }

    &::-webkit-scrollbar-thumb {
      background: #99a9bf;
      border-radius: 15px;
    }
  }
}
.sidebar-container{
  .el-scrollbar__wrap{
    box-sizing: border-box;
    padding-top: 20px;
  }
}

.el-menu-item{
  border-radius: 5px;
  flex-shrink: 0;
  &:hover{
    background-color: rgba(63, 140, 255, 0.1) !important;
  }
}
.el-menu-item, .el-submenu__title{
  height: 40px !important;
  line-height: 40px !important;
  
}
.el-menu-item, .el-submenu{
  margin-bottom: 20px;
}
.nest-menu{
  .el-menu-item, .el-submenu{
    margin-bottom: 0;
    margin-top: 20px;
  }
}
.el-menu--popup{
  .el-menu-item, .el-submenu{
    margin-bottom: 10px;
    margin-top: 10px;
  }
}
.collapse{
  .el-submenu__title{
    padding-left: 0 !important;
  }
}
.is-active{
  color: rgba(0, 119, 255, 0.94) !important;
  .el-submenu__title *{
    color: rgba(0, 119, 255, 0.94) !important;
  }
}
.nest-menu{
  .el-menu-item {
    padding-left: 68px !important;
  }
  .el-menu-item.is-active{
    background-color: rgba(63, 140, 255, 0.1) !important;
  }
}
.only-one-child{
  .submenu-title-noDropdown.is-active{
    background-color: rgba(63, 140, 255, 0.1) !important;
  }
}







.dark {
  #app{
    .sidebar-container{
      background-color: #1d1e1f;
      .el-menu{
        background-color: #1d1e1f !important;
      }
      .el-menu-item,.el-submenu__title{
        background-color: #1d1e1f !important;
        color: #fff !important;
      }
      .el-menu-item.is-active{
        color: rgba(0, 119, 255, 0.94) !important;
      }
      .el-submenu.is-active.is-opened{
        // background-color: rgba(255, 255, 255, 0.3) !important;
      }
      .is-opened{
        .el-submenu__title,.el-menu{
          // background-color: rgba(255, 255, 255, 0.3) !important;
        }
      }
      
    }
    .only-one-child.router-link-exact-active.router-link-active{
      background-color: transparent !important;
    }
  }
}